package chapter10.Inferface;
/**演示多态传递现象*/
public class InterfacePloyPass {
    public static void main(String[] args) {
        IG ig = new Teacher();
//   如果IG继承了IH这个接口，而Teacher类实现IG接口，相当于Teacher也实现了IH这个接口
        IH ih = new Teacher();
    }
}
interface IH{
    void Hi();
}

interface IG extends IH{}

class Teacher implements IG{
//这里就是多态传递现象
    @Override
    public void Hi() {

    }
}